home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 August / CHIP Turkiye Ağustos 2001.iso / prog / agustos / 08 / setup.exe / Favorite.hta < prev    next >
Text File  |  2001-06-19  |  3KB  |  105 lines

  1. <html>
  2. <head>
  3. <title>Favorites to HTML</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5.   <HTA:APPLICATION ID="oMyApp" 
  6.     APPLICATIONNAME="Favorites to HTML" 
  7.     BORDER="yes"
  8.     CAPTION="yes"
  9.     SCROLL="no"
  10.     ICON="Favorite.ico"
  11.     SHOWINTASKBAR="yes"
  12.     SINGLEINSTANCE="yes"
  13.     SYSMENU="yes"
  14.     INNERBORDER="no"
  15.     CONTEXTMENU = "no"
  16.   />
  17. <script language="javascript">
  18. resizeTo (460,240);
  19. function doSave() {
  20.     if (infile.value=="") { alert("Please enter your Favorites location."); return;}
  21.     else if (outfile.value=="") { alert("Please select an output file."); return;}
  22.  
  23. var filein = infile.value;
  24. var fileout= outfile.value;
  25.     try {
  26.         favorite.save( filein, fileout );
  27.         alert("Favorites saved to " + fileout);
  28.     } catch (e) { alert(e.description); }
  29. }
  30. function getFav() {
  31.     ver.innerText = "version: " + favorite.Version;
  32.    var wshShell = new ActiveXObject("WScript.Shell");
  33.     try {
  34.         infile.value = wshShell.SpecialFolders("Favorites");
  35.         outfile.value= wshShell.SpecialFolders("MyDocuments") + "\\Favorite.htm";
  36.     } catch (e) { alert(e.description); }
  37.     wshShell = null;
  38.     favorite.setPath(iconpath.value);
  39. }
  40. </script>
  41. <script language="javascript" for="iconpath" event="onchange">
  42.     try {
  43. favorite.setPath(this.value);
  44.     } catch (e) { alert(e.description); }
  45. </script>
  46. <script language="javascript" for="foldersfirst" event="onchange">
  47. favorite.setOrder(this.checked);
  48. </script>
  49. <style type="text/css">
  50. <!--
  51. body {  font-family: Verdana, Arial, Helvetica, sans-serif; background-color: buttonface; font-size: 8pt;}
  52. td {  font-size: 8pt}
  53. h2 {  font-size: 12pt}
  54. .small {  font-size: x-small}
  55. -->
  56. </style>
  57. </head>
  58.  
  59. <body bgcolor="#FFFFFF" onload="getFav();">
  60.  
  61. <h2>Favorites to HTML</h2>
  62. <object code="Favorite.class" id="favorite" vspace="0" hspace="0" width="100%" height="2">
  63. </object>
  64. <table border="0" cellspacing="2" cellpadding="2">
  65. <tr>
  66. <td>Favorites path:</td>
  67. <td>
  68. <input type="text" name="infile" size="35">
  69. </td>
  70. <td> </td>
  71. </tr>
  72. <tr>
  73. <td>Save Path: </td>
  74. <td>
  75. <input type="text" name="outfile" size="35">
  76. </td>
  77. <td> </td>
  78. </tr>
  79. <tr>
  80. <td>Image path:</td>
  81. <td>
  82. <input type="text" name="iconpath" value="icons\" size="35">
  83. </td>
  84. <td> </td>
  85. </tr>
  86. <tr>
  87. <td nowrap>List folders first?</td>
  88. <td>
  89. <input type="checkbox" name="foldersfirst" value="checkbox">
  90.  
  91. </td>
  92. <td> </td>
  93. </tr>
  94. <tr>
  95. <td>
  96. <div id="ver">version: 1.80</div>
  97. </td>
  98. <td><button name="saveit" onclick="doSave();">Save</button></td>
  99. <td><button name="exit" onclick="window.close();"> Exit </button></td>
  100. </tr>
  101.  
  102. </table>
  103. </body>
  104. </html>
  105.